/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * alertError.java
 *
 * Created on 07-may-2009, 18:52:48
 */

package alertas;

import clientes.Cliente;
import laboratorio.Clientes;
import laboratorio.Doctores;
import laboratorio.Productos;
import laboratorio.Trabajos;
import laboratorio.Facturas;

/**
 *
 * @author rocio
 */
public class alertError extends javax.swing.JFrame {
    private Productos VentanaProductoOld;
    private Doctores VentanaDoctorOld;
    private Trabajos VentanaTrabajoOld;
    private Clientes VentanaClienteOld;
    private Facturas VentanaFacturaOld;
    /** Creates new form alertError */
    public alertError() {
        initComponents();
    }

    public alertError(String frase, Clientes aThis) {
        VentanaClienteOld=aThis;
        initComponents();
        jLabel1.setText(frase);
    }

    public alertError(String frase, Doctores aThis) {
        VentanaDoctorOld=aThis;
        initComponents();
        jLabel1.setText(frase);
    }
    public alertError(String frase, Productos aThis) {
        VentanaProductoOld=aThis;
        initComponents();
        jLabel1.setText(frase);
    }

    public alertError(String frase, Trabajos aThis) {
        VentanaTrabajoOld=aThis;
        initComponents();
        jLabel1.setText(frase);
    }

    public alertError(String frase, Facturas aThis) {
        VentanaFacturaOld=aThis;
        initComponents();
        jLabel1.setText(frase);
    }
    public alertError(String frase){
        initComponents();
        jLabel1.setText(frase);
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setAlwaysOnTop(true);
        setName("Form"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(laboratorio.LaboratorioApp.class).getContext().getResourceMap(alertError.class);
        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N
        jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                Aceptar(evt);
            }
        });

        jLabel2.setFont(resourceMap.getFont("jLabel2.font")); // NOI18N
        jLabel2.setIcon(resourceMap.getIcon("jLabel2.icon")); // NOI18N
        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jButton1)
                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 355, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(102, 102, 102)
                        .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(25, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(44, 44, 44)
                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(57, 57, 57)
                .addComponent(jButton1)
                .addContainerGap(63, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void Aceptar(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Aceptar
        this.setVisible(false);
    }//GEN-LAST:event_Aceptar

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new alertError().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    // End of variables declaration//GEN-END:variables

}
